package com.db.protocol;

import java.util.Map;

import com.db.protocol.exception.ParseProtocolException;
import com.db.protocol.tags.RejectReason;
import com.db.protocol.tags.Tag;
import com.db.data.Order;
import com.db.data.Price;

public interface ProtocolServer {
	
	String msgReportLogon();
	
	String msgReportLogout();
	
	String msgAck(Order order);
	
	String msgPartiallyFilled(Order order, Price lastPrice, int lastCount, String otherClientID);
	
	String msgFilled(Order order, Price lastPrice, int lastCount, String otherClientID);
	
	String msgCancelled(Order order);
	
	String msgRejectedReport(Order order, String error);
	
	String msgRejected(RejectReason reason, String error);

	String msgRejected(ParseProtocolException exception);
	

	Map<Tag, Object> parseMessage(String message) throws ParseProtocolException;
	
}
